public class Demo04073 {
    //定义三个有参数有返回值方法，分别实现计算三角形、正方形、长方形的面积。
    public static void  main(String[] args){
        System.out.println(getTriangleArea_01(12,12));
        System.out.println(getSquareArea_02(12));
        System.out.println(getRectangArea_03(67,77));
    }

    public  static double getTriangleArea_01(double a,double b){
        return  a*b*0.5;
    }
    public static double getSquareArea_02(double a){
        return Math.pow(a,2);
    }
    public  static double getRectangArea_03(double a,double b){
        return a*b;
    }
}
